<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>站点管理_添加站点</title>
<link href="/css/role.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- title -->
<div class="right_title">
  <div class="h">系统模块->添加活动位置常量</div>
</div>
<!-- title end -->
<div class="zdgl">

 <form action="/pos/su_campaign_position.shtml" name="pos" onsubmit="return validate.getSubmit()();">
  <input name="id" value="${camPos.id}" type="hidden" />
   <div class="line clear">
    <div class="td_left" style="width: 100px;">活动位置名称：</div>
    <div>
      <input type="text" name="cp.positionName" value="${camPos.positionName}" maxlength="32" class="w_180" />
    </div>
  </div>
  <div class="line clear">
    <div class="td_left"style="width: 100px;">活动位置类型：</div>
    <div>
      <input type="text" name="cp.playType" value="${camPos.playType}" class="w_180" maxlength="32" />
    </div>
  </div>

   <div class="sub clear"><input class="blue_btn" type="submit" name="sm" value="确定"/>&nbsp;<input class="blue_btn" onclick="come_back();" type="button" name="sm" value="返回列表" /> </div>
   
   </form>

</div>
</body>
</html>
<script type="text/javascript" src="/scripts/util.js"></script>	
<script type="text/javascript" src="/scripts/east.js"></script>	
<script type="text/javascript" src="/scripts/form_validate.js"></script>
<script type="text/javascript" src="/scripts/mini.js"></script>
<script type="text/javascript">
    validate.addvalidte(document.pos,{
        rules:{
        	playType:{checkNull:true},
        	positionName:{checkNull:true}
           },
	    message:{
	    	playType:{checkNull:"必填项!"},
	    	positionName:{checkNull:"必填项!"}
	    },
	    errorPlacement:function(e,m){
	       ep(e,m);
	    },
	    success:function(e){
	        suc(e);
	    }
	    });
	

	function ep(e,m){
	   var tag = e.getAttribute('warn');
	       if(tag!='true'){
	         e.setAttribute('warn','true');
	         var div = util.cElem('label',{className:'error',cssText:'',id:e.name+'_error'},m);
	         insertAfter(div,e);
	       }
	}
	
	function suc(e){
	    var o = util.$(e.name+'_error');
		o && o.parentNode && (o.parentNode.removeChild(o));
		e.setAttribute('warn','false');
	}
	    
	function _submit(th){
      	if(validate.getSubmit()() ){
	       document.pos.submit();
	       th.disabled = "disabled";
	    }
	}
</script>

